import request from '@/utils/system/request'

// 获取数据字典类型表格数据
export function getDictValueData(params) {
    return request({
        url: '/dict/value/page',
        method: 'get',
        params
    })
}

//新增数据字典值
export function addDictValue(data) {
    return request({
        url: '/dict/value/add',
        method: 'post',
        data
    })
}

//更新数据字典值
export function editDictValue(data) {
    return request({
        url: '/dict/value/edit',
        method: 'put',
        data
    })
}

//单个删除数据字典值，【根据应用场景，不提供批量删除】
export function delValueOne(id) {
    return request({
        url: '/dict/value/delete',
        method: 'delete',
        params: {
            id: id
        }
    })
}

//查询数据字典值
export function queryDict(code) {
    return request({
        url: '/dict/' + code,
        method: 'get',
        params: {}
    })
}